-- @owner: wan005
-- @date: 2024-08-12
-- @testpoint: length()函数在自定义函数中的测试

--prestep1:切换B库;expect:执行成功
@conn PrimaryDbBmode;
show sql_compatibility;

--step1:创建函数;expect:成功
drop function if exists func_length_0018;
create or replace function func_length_0018(c1 text)
returns text
as  $$
begin
    return length(c1);
end;
$$language plpgsql;
/

--step2:调用函数;expect:成功
call func_length_0018(000000001);
call func_length_0018('');

--step3:清理环境;expect:成功
drop function func_length_0018;